//
//  NSObject+TZExtension.h
//  TZOCExtension
//
//  Created by Tim.Z on 2017/1/15.
//  Copyright © 2017年 Tim.Z. All rights reserved.
//

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN

@interface NSObject (TZExtension)

#pragma mark - Associate value
    ///=============================================================================
    /// @name Associate value
    ///=============================================================================
- (void)tz_setAssociateValue:(nullable id)value withKey:(void *)key;

- (void)tz_setAssociateWeakValue:(nullable id)value withKey:(void *)key;

- (nullable id)tz_getAssociatedValueForKey:(void *)key;

- (void)tz_removeAssociatedValues;


#pragma mark - Others
///=============================================================================
/// @name Others
///=============================================================================
+ (NSString *)tz_className;

- (NSString *)tz_className;

- (nullable id)tz_deepCopy;
///=============================================================================
#pragma mark - KVO
///=============================================================================

- (void)tz_addObserverBlockForKeyPath:(NSString*)keyPath
                             block:(void (^)(id _Nonnull obj, id _Nonnull oldVal, id _Nonnull newVal))block;

- (void)tz_removeObserverBlocksForKeyPath:(NSString*)keyPath;


- (void)tz_removeObserverBlocks;

@end
NS_ASSUME_NONNULL_END
